package com.hq.fxh.Receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.hq.fxh.Utils.LogUtils;

/**
 * /**
 *
 * @author 薛
 * @ClassName
 * @Description :
 * @Created 2017/9/11
 * @Email xlwenhao1858@sina.com
 */


public class BootReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals("com.dbjtech.waiqin.destroy")) {
            //TODO
            //在这里写重新启动service的相关操作
            LogUtils.e("收到广播");
            startUploadService(context);
        }

    }

    private void startUploadService(Context context) {
        Intent myServiceIntent = new Intent(context, MyService.class);
        context.startService(myServiceIntent);
    }

}